<!DOCTYPE html>
<html lang="en">
<head>
  <base href="<%= APP_BASE %>">
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title><%= APP_TITLE %></title>
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" href="assets/favicon/favicon-<%= ENV_CONFIG.ENV %>.ico" type="image/x-icon">

  <!-- inject:css -->
  <!-- endinject -->

  <% if (TARGET_DESKTOP) { %>
  <!-- shims:js -->
  <!-- endinject -->
  <% } %>

  <% if (BUILD_TYPE === 'prod') { %>
  <!-- segment.io -->
  <script type="text/javascript">
  !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="3.1.0";

  // REPLACE with your Segment.io write_key
  analytics.load("XVDaTIQYy5g0akx5iTJmPozLKWFLkX6y");
  analytics.page()
  }}();
  </script>
  <% } %>

</head>
<body>

  <sd-app>Loading...</sd-app>

  <script>
  // Fixes undefined module function in SystemJS bundle
  function module() {}
  </script>

  <% if (!TARGET_DESKTOP) { %>
  <!-- shims:js -->
  <!-- endinject -->
  <% } %>

  <% if (BUILD_TYPE === 'dev') { %>
  <script src="<%= APP_BASE %>system-config.js"></script>
  <% } %>

  <!-- libs:js -->
  <!-- endinject -->

  <!-- inject:js -->
  <!-- endinject -->

  <% if (BUILD_TYPE === 'dev') { %>
  <script>
  System.import('<%= BOOTSTRAP_MODULE %>')
    .catch(function (e) {
      console.error(e.stack || e,
        'Not expecting this error? Report it at https://github.com/NathanWalker/angular-seed-advanced/issues');
    });
  </script>
  <% } %>

  <% if (TARGET_DESKTOP && BUILD_TYPE !== 'prod') { %>
  <script>require('electron-connect').client.create()</script>
  <% } %>

</body>
</html>
